import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * 阻塞io模型
 * @author liyanhao
 * @Date 2022-12-02 10:02
 */
public class RedisServer {
    public static void main(String[] args) throws IOException {
        byte[] bytes = new byte[1024];
        ServerSocket serverSocket = new ServerSocket(6379);
        while (true) {
            System.out.println("模拟RedisServer启动----1111 等待链接");
            Socket accept = serverSocket.accept();
            System.out.println("-----22222,成功链接");
            System.out.println();
        }
    }
}
